-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(replay): Add Playwright tests for error-mode and error linking #7251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3a847ab
to
3a12c53
Compare
|
||
expect(event0).toEqual( | ||
getExpectedReplayEvent({ | ||
contexts: { replay: { error_sample_rate: 1, session_sample_rate: 0 } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also really shows a problem with how we handle this today 😅 we should address this with hooks as soon as we can, IMHO, as this is pretty confusing if you think about this 😅 (the test is good though to make clear this is expected)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed. As we discussed on Monday, the test, in this case, shows how this behavior is unexpected to users. Will leave a note about this in the test file to clarify.
replay_type: 'error', | ||
}), | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we stop the test here, I wonder? As I guess everything below here is kind of a duplicate of the other test(s) about error --> session mode switch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, good point. I also streamlined the session mode tests as they tested too much-duplicated stuff (classic case of copy 🍝)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very cool!
size-limit report 📦
|
This PR adds four integration tests for replays where errors occur:
ref: #7044